package response

const (
	CodeSuccess = 0
	MsgSuccess  = "OK"
)

// BaseResponse 通用响应结构
type BaseResponse struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

// Success 返回业务成功响应
func Success(data interface{}) BaseResponse {
	return BaseResponse{
		Code: CodeSuccess,
		Msg:  MsgSuccess,
		Data: data,
	}
}
